/*
 * @Description: user请求接口
 * @Author: yue
 * @Date: 2022-08-29 19:02:46
 * @LastEditors: yue
 * @LastEditTime: 2022-09-03 12:38:57
 */

import request from '@/utils/request'

/**
 * @description: 登录
 * @param {object} object mobile（手机号），password（密码）
 * @return {promise} axios
 */
export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

/**
 * @description: 获取用户信息
 * @return {promise} axios
 */
export function getUserInfo() {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}

/**
 * @description: 获取用户详情
 * @param {string} id 用户id
 * @return {promise} axios
 */
export function getBaseUserInfo(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'get'
  })
}
